<p>递4方API试算：<?= $this->weight ?>kg重量计算</p>
<table>
    <tr>
        <td>产品中文名称</td>
        
        <td>产品代码</td>
        <td>递送时间</td>
        <td>杂费</td>
        <td>运费金额</td>
        <td>燃油附加费金额</td>
        <td>总费用</td>
    </tr>
    <? foreach ($this->result as $item){ 
     $hasword = function ($word,$item){
         if(stripos('_'.$item['productCName'],$word)!=FALSE){
             return true;
         }
         return FALSE;
     };
     $class='';
     if($hasword('联邦', $item)){
         $class='fedex';
     }
     if($hasword('DHL', $item)){
         $class='dhl';
     }
     if($hasword('ups', $item)){
         $class='ups';
     }
     if($hasword('Ems', $item)){
         $class='ems';
     }
     if($hasword('小包', $item)){
         $class='air';
     }
     
        ?>
    <tr class="erow <?= $class?>">
        <td><?= $item['productCName'] ?></td>
        <td><?= $item['productCode'] ?></td>
        <td><?= $item['deliveryperiod'] ?></td>
        <td><?= array_key_exists('incidentalRmbAmount', $item)?$item['incidentalRmbAmount']:'&nbsp;' ?></td>
        <td><?= $item['freightRmbAmount'] ?></td>
        <td><?= array_key_exists('freightOilRmbAmount', $item)?$item['freightOilRmbAmount']:'&nbsp;' ?></td>
        <td><?= $item['totalRmbAmount'] ?></td>
    </tr>
    <? } ?>
</table>
